module.exports = {
  baseUrl: './',
  outputDir: 'vitec-equipment-data',
  assetsDir: './',
  devServer: {
    host: 'dev.vkforest.com',
    port: 9188,
    proxy: {
      'equipment-api': {
        target: 'http://vip.vkforest.com/operate_man/atten/wap/public/equipment.php',
        changeOrigin: true,
        pathRewrite: {
          '^/equipment-api': ''
        }
      },
      'real-api': {
        target: 'http://iotapp.vkforest.com',
        changeOrigin: true,
        pathRewrite: {
          '^/real-api': ''
        }
      },
      'auth-api': {
        target: 'http://mdg.vkforest.com/auth/public/index.php',
        changeOrigin: true,
        pathRewrite: {
          '^/auth-api': ''
        }
      }
    }
  },
  chainWebpack: config => {
    config.merge({
      externals: {
        'vue': 'Vue',
        'axios': 'axios',
        'element-ui': 'ELEMENT',
        'echarts': 'echarts'
      }
    })
  }
}